@extends('layouts.console_header')

@section('title', '消费明细')

@section('resources')
    @parent

@endsection

@section('content')
<!--  html内容  -->
<section class="user_list">
	<div style="border-bottom: 2px solid #9955c6;overflow: hidden;">
		<p class="fz_14 account_title fl" style="border: none;">
		    <span style="color: #7f7f7f;"><a href="/console/index">首页</a>>财务中心><a href="/console/finance/user/statement">用户对账单</a>></span>
		    <span class="co_violet">消费明细</span>
        </p>
		<a onclick="history.go(-1);" href="#"><p class="fr tc back_btn">返回</p></a>
		<a href="#"><p class="fr tc back_btn">导出</p></a>
	</div>
	<div style="border-bottom: 2px solid #9955c6;overflow: hidden;">
        <span class="fz_14 account_title fl" style="border: none;">
            昵称：{{$userinfo['nickname']}}  &nbsp;&nbsp;
            帐号：{{$userinfo['mobile']}}
        </span>
        <span></span>
    </div>
	<table class="finance_top_list">
		<tr>
			<th>订单数</th>
			<th>收银金额</th>
			<th>手续费</th>
			<th>红包</th>
			<th>实付金额</th>
		</tr>
		<tr>
			<td>{{$ordernum}}</td>
			<td>{{$orderamount}}</td>
			<td>{{$fee}}</td>
			<td>{{$redenvelopeamount}}</td>
			<td>{{$actualamount}}</td>
		</tr>
	</table>
	<table id="example" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th>序号</th>
                <th>用户昵称</th>
                <th>用户账户</th>
                <th>商家代码</th>
                <th>商家名称</th>
                <th>收银金额</th>
                <th>手续费</th>
                <th>红包</th>
                <th>实付金额</th>
                <th>消费时间</th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th>序号</th>
                <th>用户昵称</th>
                <th>用户账户</th>
                <th>商家代码</th>
                <th>商家名称</th>
                <th>收银金额</th>
                <th>手续费</th>
                <th>红包</th>
                <th>实付金额</th>
                <th>消费时间</th>
            </tr>
        </tfoot>
        <tbody>
        @foreach($data as $list)
            <tr>
            @if(!isset($i))
                <td>{{$i=1}}</td>
            @else
                <td>{{++$i}}</td>
            @endif
                <td>{{$userinfo['nickname']}}</td>
                <td>{{$userinfo['mobile']}}</td>
                <td>{{$list['shopcode']}}</td>
                <td>{{$list['shopname']}}</td>
                <td>{{$list['orderamount']}}</td>
                <td>{{$list['fee']}}</td>
                <td>{{$list['redenvelopeamount']}}</td>
                <td>{{$list['actualamount']}}</td>
                <td>{{date('Y-m-d H:i:s', strtotime($list['created_at']))}}</td>
            </tr>
        @endforeach
        </tbody>
    </table>
</section>
@endsection

@section('scriptResources')
    @parent

@endsection